urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compile 您所在的位置:网站首页 python 27版本 urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compile

urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compile

#urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compile| 来源: 网络整理| 查看: 265

最近遇到的python脚本报错的问题

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168 复制代码

原因和解决方案:

机器的openssl版本太低了,可以输入 openssl version查看ssl版本,需要大于1.1.1版本,可以升级下openssl到最新版本 通过github.com/urllib3/url… 查看原因,主要是urllib3版本为v2.0,依赖openssl高版本,可以自己使用低于2.0版本的urllib3 #创建requirements.txt文件,写上 urllib3==1.24.3 指定urllib3版本,执行下面的命令 pip install -r requirements.txt 复制代码 如果还是不行,可以看下urllib3是哪个依赖库下载的,例如我遇到的是依赖了request库,间接下载了urllib3,由于request下载的是2.30.0最新版本,依赖下载了urllib3 2.0版本,所以我指定了request为2.29.0版本,也解决了该问题 pip install "requests==2.29.0" 复制代码


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有